import {Component, OnInit} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import {ActivatedRoute, ParamMap} from '@angular/router';

@Component({
    templateUrl: './swagger-details.component.html',
    styleUrls: ['./swagger-details.component.css']
})
export class SwaggerDetailsComponent implements OnInit {
    iframeSrc = this.domSanitizer.bypassSecurityTrustResourceUrl('');

    constructor(private domSanitizer: DomSanitizer,
                private activatedRoute: ActivatedRoute) {

        this.activatedRoute.paramMap.subscribe((params: ParamMap) => {
            this.iframeSrc = this.domSanitizer.bypassSecurityTrustResourceUrl(decodeURIComponent(params.get('iframeSrc')));
        })
    }

    ngOnInit() {
    }


}
